package com.youchuang.action.indent;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;

import com.youchuang.action.BaseAction;
import com.youchuang.common.Constant;
import com.youchuang.service.IndentService;

/**
 * 修改订单
 * 
 * @author Administrator
 *
 */
@Namespace(value = "/indent")
@ParentPackage("shopping-default")
public class UpdateIndentAction extends BaseAction {

	private Logger logger = Logger.getLogger(UpdateIndentAction.class.getSimpleName());
	private String id;
	private int status;
	
	@Resource
	private IndentService indentService;

	@Action(value = "updateIndent", results = { @Result(name = Constant.SUCCESS, type = "json") })
	public String execute() throws Exception {
		logger.info("method is execute");

		indentService.updateIndent(id, status);

		return Constant.SUCCESS;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

}
